<!DOCTYPE html>
<html lang="en">
    <head>
        <title>DOM编程艺术第四章</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link href="css/style.css" rel="stylesheet">
        <link rel="stylesheet" href="./layuot.css">
    </head>
    <body>
        <h1>Snapshots</h1>
        <ul>
            <li>
                <!-- return false用来阻止a链接的默认跳转 -->
                <!-- 原理：当点击a链接的时候会先执行onclick的函数在执行a链接的跳转，当在点击事件红后添加return false，会阻止a链接的默认跳转 -->
                <a onclick="showPic(this);return false" href="./imges/img_1.png" title="美女一号">美女一号</a>
            </li>
            <li>
                <a onclick="showPic(this);return false" href="./imges/img_2.png" title="美女二号">美女二号</a>
            </li>
            <li>
                <a onclick="showPic(this);return false" href="./imges/img_3.png" title="美女三号">美女三号</a>
            </li>
            <li>
                <a onclick="showPic(this);return false" href="./imges/img_4.png" title="美女四号">美女四号</a>
            </li>
        </ul>
        <img id="placeholder" src="./imges/img.png" alt="">
        <p id="description">这是一份图片说明</p>
        <script src="./showPic.js"></script>
    </body>
</html>